package tt.com.deadcold.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import tt.com.common.enums.Status;
import tt.com.common.model.ColdRoomAndMessage;
import tt.com.common.util.CommonResult;
import tt.com.common.util.PageUtil;
import tt.com.deadcold.mapper.DeadColdMapper;
import tt.com.deadcold.service.DeadColdStatistics;

@Service
public class DeadColdStatisticsImpl extends ServiceImpl<DeadColdMapper,ColdRoomAndMessage> implements DeadColdStatistics {
    @Override
    public CommonResult showroom0() {
        return CommonResult.buildR(Status.OK,"",baseMapper.selectroom0());
    }

    @Override
    public CommonResult showroom1() {
        return CommonResult.buildR(Status.OK,"",baseMapper.selectroom1());
    }

    @Override
    public CommonResult showroommessage(PageUtil pageUtil) {
        return CommonResult.buildR(Status.OK,"",baseMapper.roommessage(pageUtil.getPageIndex(),pageUtil.getPageSize()));
    }

    @Override
    public CommonResult showeverydaycome() {
        return CommonResult.buildR(Status.OK,"",baseMapper.showeverydaycome());
    }

    @Override
    public CommonResult showeverydayenter() {
        return CommonResult.buildR(Status.OK,"",baseMapper.showeverydaycome());
    }
}
